﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RhinoMockStudy
{
    class Program
    {
        static void Main(string[] args)
        {
            var p = new Product();

            var s = new UserBuyProductService();

            int quality = 10;


            Console.WriteLine("购买前总数是：{0} .",p.TotalAmount);
            Console.WriteLine("购买前{0}一共有钱数：{1} .", s.Customer.CustomerName,s.Customer.TotalMoney);


            Console.WriteLine("产品{0}的单价是：{1} .", p.ProductName,p.Price);
            Console.WriteLine("购买数是：{0} .", quality);
            s.Buy(p,quality);


            Console.WriteLine("购买之后产品剩余是：{0} .", p.TotalAmount);
            Console.WriteLine("购买之后{0}一共有钱数：{1} .", s.Customer.CustomerName, s.Customer.TotalMoney);


            Console.ReadKey();
        }
    }
}
